Identifying Similar Code with Program Dependence Graphs
نویسنده
چکیده
We present an approach to identify similar code in programs based on finding similar subgraphs in attributed directed graphs. This approach is used on program dependence graphs and therefore considers not only the syntactic structure of programs but also the data flow within (as an abstraction of the semantics). As a result, there is no tradeoff between precision and recall—our approach is very good in both. An evaluation of our prototype implementation shows that our approach is feasible and gives very good results despite the non polynomial complexity of the problem.
منابع مشابه
Code Similarity Using Program Dependence Graphs
Propose a system which uses Program Dependence Graphs as an intermediate representation of codes to perform approximate sub graph isomorphism using graph alignment techniques for finding similar code. The document aims at defining all of the concepts used to build the system along with the results being compared with the current state of the art, JPLAG. The proposed system only works for Java c...
متن کاملSlicing Aspect-Oriented Software
Program slicing has many applications in software engineering activities including program comprehension, debugging, testing, maintenance, and model checking. In this paper, we propose an approach to slicing aspect-oriented software. To solve this problem, we present a dependencebased representation called aspect-oriented system dependence graph (ASDG), which extends previous dependence graphs,...
متن کاملDetecting Refactorable Clones by Slicing Program Dependence Graphs
Code duplication in a program can make understanding and maintenance difficult. The problem can be reduced by detecting duplicated code, refactoring it into a separate procedure, and replacing all the clones by appropriate calls to the new procedure. In this paper, we report on a confirmatory replication of a tool that was used to detect such refactorable clones based on program dependence grap...
متن کاملEquivalence of Program Dependence Graphs in Refactoring
Program dependence graphs are widely used in computer science for example when performing optimizations, parallelization and as an internal program representation in integrated development environments. In this paper, I will look into the usefulness of program dependence graphs regarding refactoring. Refactoring is a very useful technique to improve the internal structure of a program. Many mod...
متن کاملAn Approach for Computing Dynamic Slice of Concurrent Aspect-Oriented Programs
We propose a dynamic slicing algorithm to compute the slice of concurrent aspect-oriented programs. We use a dependence based intermediate program representation called Concurrent Aspect-oriented System Dependence Graph (CASDG) to represent a concurrent aspect-oriented program. The CASDG of an aspect-oriented program consists of a system dependence graph (SDG) for the non-aspect code, a group o...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2001